<!--
	作者：495246490@qq.com
	时间：2016-04-25
	描述：参数文案列表
-->
<h3>{{rootColumnName}}
    <small>{{rootColumnPrompt}}</small>
</h3>
<div  ng-controller="contestListCtrl" class="panel panel-default">
    <div class="col-sm-6">
        <div class="panel-heading">
            <form class="form-inline">
                <div class="form-group">
                    <label for="">{{userSelectName}} : </label>
                    <input style="width:150px" type="text" ng-change="userChange()" autocomplete="off" ng-model="userSearchKey" class="form-control" placeholder="{{searchplaceholder}}" ng-focus="userType = true" ng-blur="hideUl()">
                    <ul ng-show="userType" class="user-ul-style" style="margin-top: 12px; margin-left: 50px">
                        <li ng-repeat="userItem in userList" class="user-li-style" ng-click="changeName(userItem.user.name,userItem.user.userId)">
                            <a class="cursor-p"><img err-src="./app/img/error-err.png" style="height:30px; border-radius: 50%; " ng-src="{{userItem.user.headURL}}"/></a>
                            {{userItem.user.name}}
                        </li>
                        <li ng-show="userType && !userList.length">没有找到相关用户</li>
                    </ul>
                    <label for="">{{titleSelectName}} : </label>
                    <input style="width:150px" type="text" ng-keyup="dataEvent($event)" ng-model="searchKey" class="form-control" placeholder="{{searchplaceholder}}">
                </div>
            </form>
        </div>
        <div class="panel-heading">
            <form class="form-inline">
                <div class="form-group">
                    <label for="">{{fieldSearch}} : </label>
                    <select class="custom-css form-control"  ng-model="fieldSelectValue" ng-change="dataChange()" ng-options="fieldSelectValue.name for fieldSelectValue in realmList" >
                    </select>
                    <label style="margin-left:20px" for="">{{sortTypeSearch}} : </label>
                    <select class="custom-css form-control"  ng-model="sortSelectValue" ng-change="dataChange()" ng-options="sortSelectValue._value_ for sortSelectValue in sortTypes" >
                    </select>
                </div>
            </form>
        </div>

        <div class="panel-heading">
            <button type="button" ui-sref="cms.addContest" class="btn btn-labeled btn-primary">
                    <span class="btn-label">
                        <i class="fa fa-plus"></i>
                    </span>新建擂台
            </button>
        </div>
    </div>
    <div class="panel panel-success col-sm-2 no-padding-l-r" style="margin-top: 10px">
        <div class="panel-heading"><h6 class="text-center">今日新擂台数量</h6></div>
        <div class="panel-body text-center">
            <span class="big-font">{{newTopicCount}}</span>
        </div>
    </div>
    <div class="panel panel-warning col-sm-2 col-sm-offset-1 no-padding-l-r" style="margin-top: 10px">
        <div class="panel-heading"><h6 class="text-center">今日新擂台关注数量</h6></div>
        <div class="panel-body text-center">
            <span class="big-font">{{newTopicFavoriteCount}}</span>
        </div>
    </div>

    <div class="panel-body " ng-class="loading?'whirl standard':'' " style="border-top: 1px solid #CFDBE2;">
        <table class="table table-striped table-condensed">
            <thead>
            <tr>
                <th>标题</th>
                <th>作者</th>
                <th>影响力</th>
                <th>发布方式</th>
                <th>关注数</th>
                <th>回复数</th>
                <th>发布时间</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <!-- repeat begin -->
            <tr ng-repeat=" topicItem in topicList ">
                <td title="{{topicItem.title}}">{{topicItem.title | limitToNum : 20}}</td>
                <td>{{topicItem.userInfo.user.name | null_value_filter}}</td>
                <td>{{topicItem.userInfo.score}}</td>
                <td>匿名</td>
                <td>{{topicItem.favoriteCount}}</td>
                <td>{{topicItem.evaluateCount}}</td>
                <td>{{topicItem.createTime}}</td>
                <td>
                    <a tooltip="查看" tooltip-trigger="mouseenter" class="btn btn-xs btn-primary" ui-sref="cms.contestDetail({ size : turnPage.itemsPerPage, page : turnPage.currentPage, sortType : sortSelectValue.sortType, realmId : fieldSelectValue.realmId, searchKey : searchKey, type : 0, topicId : topicItem.topicId , topicRealm : topicItem.topicRealm , searchUserId : appUserId })"><i class="fa fa-eye"></i></a>
                    <a tooltip="屏蔽话题" tooltip-trigger="mouseenter" class="btn btn-xs btn-warning" ng-disabled="topicItem.status == 1" ng-click="removeTopic(topicItem.topicId)"><i class="fa fa-trash-o"></i></a>
                </td>
            </tr>
            <!-- repeat end -->
            </tbody>
        </table>
        <p style="display: inline-block; margin:21px 0;height: 30px;line-height: 30px;"> 显示 <strong>{{turnPage.totalItems}}</strong> 条中的 <strong>{{turnPage.itemsPerPage*(turnPage.currentPage-1)+1}}-{{ToNum}}</strong> 条</p>
        <pagination class="pull-right" first-text="{{turnPage.firstText}}" previous-text="{{turnPage.previousText}}" next-text="{{turnPage.nextText}}" last-text="{{turnPage.lastText}}" total-items="turnPage.totalItems" ng-model="turnPage.currentPage" max-size="turnPage.maxSize"
                    num-pages="numPages" boundary-links="true" ng-change="dataChange()" class="pagination-sm">
        </pagination>
    </div>
</div>